﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mw2admintool
{
	partial class admintool
	{
		public void initLang()
		{
			lang.Clear();
			lang.Add("system_name", "Admin Tool");
			lang.Add("messages", "{0}");
			lang.Add("error_fmt", "ERROR: {0}");
			lang.Add("you_are_registered", "Welcome, you are now registered as a level {0} admin!");
			lang.Add("cmd_not_exist", "No such command '{0}', use !help");
			lang.Add("cmd_disabled", "Command '{0}' is disabled!");
			lang.Add("help_cmd", "{0}(lvl: {1}):{2}");
			lang.Add("help_alias", "{0}(Alias): {1}");
			lang.Add("alias_help", "Aliases (Page: {0}/{1}): {2}");
			lang.Add("map_help", "Map names (Page: {0}/{1}): {2}");
			lang.Add("cmd_denied", "You do not have access to command '{0}'!");
			lang.Add("about", "CheeseFAKKU's MW2AdminTool {0}");
			lang.Add("insuf_params", "Insufficient parameters for {0}. {1}");
			lang.Add("map_change", "Changing map to {0} soon!");
			lang.Add("map_change_countdown", "Changing map to {0}...{1}.");
			lang.Add("map_not_exist", "No map '{0}' exists in the map list!");
			lang.Add("silenced", "You are silenced!");
			lang.Add("silenced_systematic", "Talking is current restricted to users level {0} or higher.");
			lang.Add("silenced_systematic_all", "Talking is currently restricted to non-admins!");
			lang.Add("clear_shutup", "Shutup list cleared!");
			lang.Add("shutup_invalid_level", "Invalid level '{0}'! Use positive numbers for admins and -1 for anonymous users!");
			lang.Add("shutup_systematic_on", "ShutupAll is on! Only users level {0} and higher may talk!");
			lang.Add("shutup_systematic_on_all", "ShutupAll is on! Only admins may talk!");
			lang.Add("shutup_systematic_off", "ShutupAll is off!");
			lang.Add("shutup_systematic_updated", "ShutupAll is updated to level {0}!");
			lang.Add("shutup_empty", "Shutup list is empty!");
			lang.Add("silence_person", "Silenced {0}.");
			lang.Add("client_not_exist_id", "No such client with id '{0}' exists!");
			lang.Add("invalid_id", "Invalid id '{0}'.");
			lang.Add("unknown_identype", "Unknown identify-type '{0}'.");
			lang.Add("cant_use_identype", "Invalid identify-type '{0}'.");
			lang.Add("none_identype", "Cannot use the identify-type 'none'");
			lang.Add("user_not_admin", "User '{0}' is not an admin!");
			lang.Add("unregister_priv_error", "Cannot unregiser admin '{0}' with higher or equal privilege level.");
			lang.Add("unregister_myself", "Admin '{0}' unregistered himself.");
			lang.Add("unregister_admin", "User '{0}' has been unregistered from admins.");
			lang.Add("unregister_error", "Could not unregister admin '{0}'");
			lang.Add("register_autoroot", "Since there are no admins, this admin is automatically root.");
			lang.Add("register_update_priv_error", "Admin '{0}' (lvl: {1}) cannot register with equal to or higher privliege level.");
			lang.Add("register_success", "Registered '{0}' as level {1} admin!");
			lang.Add("register_update", "Updated admin '{0}' to level {1} admin!");
			lang.Add("register_error", "Could not register admin '{0}'!");
			lang.Add("invalid_page", "Invalid page '{0}', there are {1} pages.");
			lang.Add("help_list_cmds", "Commands you may use(Page: {1}/{2}): {0}");
			lang.Add("trans_invalid_conv", "Invalid conversion '{0}'!");
			lang.Add("trans_send_error", "Could not send translation request: {0}");
			lang.Add("cmd_unknown", "Unknown command '{0}'!");
			lang.Add("cmd_invalid_level", "Invalid command level '{0}'!");
			lang.Add("cmd_set_level", "Command level of '{0}' set to {1}.");
			lang.Add("cmd_dis_enable", "Cannot disable the enable command!");
			lang.Add("cmd_already_dis", "Command '{0}' already disabled!");
			lang.Add("cmd_already_ena", "Command '{0}' already enabled!");
			lang.Add("cmd_set_disable", "Command '{0}' has been set to disabled!");
			lang.Add("cmd_set_enabled", "Command '{0}' has been set to enabled!");
			lang.Add("tell_anonymous_user", "User '{0}'(GUID:{2}) is an anonymous user with privilege level {1}.");
			lang.Add("tell_admin_user", "User '{0}' is a level {1} admin: {2}");
			lang.Add("predicate_multiple", "More than one match!");
			lang.Add("predicate_nomatch", "No one was matched!");
			lang.Add("predicate_unknown", "Unknown error!");
			lang.Add("predicate_error", "Predicate error '{0}': {1}");
			lang.Add("invalid_priv", "Invalid privilege level '{0}'!");
			lang.Add("reloaded_cfg", "Reloaded Configuration!");
			lang.Add("saved_cfg", "Re-Saved Configuration!");
			lang.Add("reloaded_lang", "Reloaded Language Configuration!");
			lang.Add("saved_lang", "Re-Saved Language Configuration!");
			lang.Add("banfail_priv", "Cannot ban user '{0}'. Insufficient privileges.");
			lang.Add("kickfail_priv", "Cannot kick user '{0}'. Insufficient privileges.");
			lang.Add("findresult", "Results: {0}");
			lang.Add("emptycmd", "Empty Command!");
			lang.Add("did_not_vote_ban", "Did not vote, cannot uncast vote-ban!");
			lang.Add("did_not_vote_kick", "Did not vote, cannot uncast vote-kick!");
			lang.Add("did_not_vote_map", "Did not vote, cannot uncast vote-map!");
			lang.Add("voteban_uncast", "'{0}' uncasted their vote-ban!");
			lang.Add("votekick_uncast", "'{0}' uncasted their vote-kick!");
			lang.Add("votemap_uncast", "'{0}' uncasted their vote-map!");
			lang.Add("we_voteban", "We vote-banned '{0}'!");
			lang.Add("we_votekick", "We vote-kicked '{0}'!");
			lang.Add("voteban", "'{0}' casted voted '{1}' for ban!");
			lang.Add("votekick", "'{0}' casted voted '{1}' for kick!");
			lang.Add("votemap", "'{0}' casted vote for map '{1}'!");
			lang.Add("voteban_prior", "'{0}' already voted! To unvote ban, use !unvoteban to uncast vote.");
			lang.Add("votekick_prior", "'{0}' already voted! To unvote kick, use !unvotekick to uncast vote.");
			lang.Add("votemap_prior", "'{0}' already voted! To unvote map, use !unvotemap to uncast vote.");
			lang.Add("votemap_fail_changing", "Cannot vote-map while map is changing!");
			lang.Add("kicked", "Kicked '{0}'{1}!");
			lang.Add("banned", "Banned '{0}'{1}!");
			lang.Add("kickban_conj", " for '{0}'");
			lang.Add("mapfail_changing", "Cannot change map while map is changing!");
			lang.Add("rconecho", "Rcon Console Echo: {0}");
			lang.Add("rconecho_warn", "The rcon command '{0}' is not safe to use with echoing, use !rcon instead.");
			lang.Add("votes_underrep", "Not enough people to start voting. Need at least {0} people.");
			lang.Add("invalid_cfg", "Invalid cfg type '{0}'!");
			lang.Add("pm_msg", "PM({0}):{1}");
			lang.Add("pm_sent", "Personal Message sent to '{0}'!");
			lang.Add("rcon_sent", "Executed Rcon '{0}'!");
			lang.Add("rcon_sent_echo", "Executed Rcon Echo '{0}'!");
			lang.Add("alias_exist_cmd", "Cannot use alias '{0}', this name exists as a normal command!");
			lang.Add("alias_added", "Added new alias-command '{0}'!");
			lang.Add("alias_not_exist", "No alias named '{0}'!");
			lang.Add("alias_updated", "Updated alias command '{0}'!");
			lang.Add("alias_deleted", "Deleted alias '{0}'!");
			lang.Add("alias_cleared", "Cleared aliases!");
			lang.Add("alias_empty", "There are no aliases!");
			lang.Add("alias_circ", "Cannot add alias, alias '{0}' references itself somewhere in the command chain!");
			lang.Add("invalid_ballot_type", "Invalid ballot type '{0}'! Use maps, kicks, bans, or all.");
			lang.Add("no_aliases", "There are no aliases to display!");
			lang.Add("no_maps", "There are no maps to display!");
			lang.Add("no_cmds", "There are no commands to display!");
			lang.Add("cleared_map_ballots", "Cleared map-ballots!");
			lang.Add("cleared_ban_ballots", "Cleared ban-ballots!");
			lang.Add("cleared_kick_ballots", "Cleared kick-ballots!");
			lang.Add("cleared_all_ballots", "Cleared ALL ballots!");
			lang.Add("cmd_help_kick", "kick someone. Usage: kick <client_id> [<reason>]");
			lang.Add("cmd_help_ban", "ban someone. Usage: ban <client_id> [<reason>]");
			lang.Add("cmd_help_register", "register a user as admin. Usage: register <client_id> [<priv_level>] [<iden_type>]");
			lang.Add("cmd_help_unregister", "Unregister an admin. Usage: unregister <client_id>");
			lang.Add("cmd_help_find", "Find someone by string fragments. Usage: findid <string>");
			lang.Add("cmd_help_votemap", "Vote for a mapchange. Usage: vote <mapname>");
			lang.Add("cmd_help_map", "Change map. Usage: map <map_name>");
			lang.Add("cmd_help_votekick", "Vote kick someone.");
			lang.Add("cmd_help_voteban", "Vote to ban someone.");
			lang.Add("cmd_help_unvoteban", "Uncast a vote-ban.");
			lang.Add("cmd_help_unvotekick", "Uncast a vote-kick.");
			lang.Add("cmd_help_unvotemap", "Uncast a vote-map.");
			lang.Add("cmd_help_shutup", "Disable talking priviliges. Usage: shutup <client_id> [<iden_type>]");
			lang.Add("cmd_help_unshutup", "Re-enable talking priviliges. Usage: unshutup [<client_id>]");
			lang.Add("cmd_help_shutupall", "Toggles talking privileges for users. Usage: !shutupall [<minimum_level>]");
			lang.Add("cmd_help_clearshutup", "Clear shutup list");
			lang.Add("cmd_help_help", "Displays available commands. Usage: !help or !help <command_name> or !help <page_num>");
			lang.Add("cmd_help_about", "Get info about mw2admintool");
			lang.Add("cmd_help_rcon", "Executes any command to the console. Use !rconecho for echoing.");
			lang.Add("cmd_help_rconecho", "Executes any command to the console with echoing.");
			lang.Add("cmd_help_trans", "Translate your message to another language. Example: !trans en-sp No cheating please!");
			lang.Add("cmd_help_disablecmd", "Disables a command. Usage: !disablecmd rcon");
			lang.Add("cmd_help_enablecmd", "Enabled a disabled command. Usage: !enablecmd rcon");
			lang.Add("cmd_help_setcmdlevel", "Sets the privilege level for a command. Usage: !setcmdlevel shutup 1");
			lang.Add("cmd_help_reloadcfg", "Reload configuration file. Usage: !reloadcfg [settings|language]");
			lang.Add("cmd_help_savecfg", "Save the configuration file. Usage: !savecfg [settings|language]");
			lang.Add("cmd_help_who", "Display information about someone. Usage: who [<client_id>]");
			lang.Add("cmd_help_pm", "Personal message someone Usage: !pm <client_id> <message>");
			lang.Add("cmd_help_alias", "Make a command alias. Usage: !alias <alias_name> [!|/]<command_name> <command_params>");
			lang.Add("cmd_help_delalias", "Delete an alias. Usage: delalias <alias_name>");
			lang.Add("cmd_help_clearalias", "Delete all aliases.");
			lang.Add("cmd_help_clearballots", "Clears ballots. Usage: !clearballot [maps|bans|kicks|all]");
			lang.Add("cmd_help_listaliases", "List all aliases.");
			lang.Add("cmd_help_listmaps", "List all map names, excluding aliases. Usage: !map [page_num]");
			lang.Add("cmd_help_rules", "Displays server rules");
			lang.Add("ban_reason", "You were voted for ban with {0} vote(s).");
			lang.Add("kick_reason", "You were voted for kick with {0} vote(s).");
			lang.Add("no_help", "No help exists for command '{0}'!");
		}

		public void initCommands()
		{
			addAction("kick", this.command_Kick, "cmd_help_kick", 0, false, 1);
			addAction("ban", this.command_Ban, "cmd_help_ban", 0, false, 1);
			addAction("register", this.command_Register, "cmd_help_register");
			addAction("unregister", this.command_UnRegister, "cmd_help_unregister");
			addAction("find", this.command_findId, "cmd_help_find", -1);
			addAction("votemap", this.command_VoteMap, "cmd_help_votemap", -1);
			addAction("map", this.command_Map, "cmd_help_map");
			addAction("listmaps", this.command_ListMaps, "cmd_help_listmaps", -1);
			addAction("clearballots", this.command_ClearBallots, "cmd_help_clearballots", 0);
			addAction("votekick", this.command_VoteKick, "cmd_help_votekick", -1);
			addAction("voteban", this.command_VoteBan, "cmd_help_voteban", -1);
			addAction("unvoteban", this.command_UnVoteBan, "cmd_help_unvoteban", -1);
			addAction("unvotekick", this.command_UnVoteKick, "cmd_help_unvotekick", -1);
			addAction("unvotemap", this.command_UnVoteMap, "cmd_help_unvotemap", -1);
			addAction("shutup", this.command_Shutup, "cmd_help_shutup");
			addAction("unshutup", this.command_UnShutup, "cmd_help_unshutup");
			addAction("shutupall", this.command_ShutupAll, "cmd_help_shutupall");
			addAction("clearshutup", this.command_ClearShutup, "cmd_help_clearshutup");
			addAction("help", this.command_Help, "cmd_help_help", -1);
			addAction("about", this.command_About, "cmd_help_about", -1);
			addAction("rcon", this.command_Rcon, "cmd_help_rcon", 0, false);
			addAction("rconecho", this.command_RconEcho, "cmd_help_rconecho", 0, false);
			addAction("trans", this.command_Trans, "cmd_help_trans", -1, false, 1);
			addAction("disablecmd", this.command_Disable, "cmd_help_disablecmd");
			addAction("enablecmd", this.command_Enable, "cmd_help_enablecmd");
			addAction("setcmdlevel", this.command_SetCmdLevel, "cmd_help_setcmdlevel");
			addAction("reloadcfg", this.command_ReloadConfig, "cmd_help_reloadcfg", 5);
			addAction("savecfg", this.command_SaveConfig, "cmd_help_savecfg");
			addAction("pm", this.command_Pm, "cmd_help_pm", -1, false, 1);
			addAction("who", this.command_Who, "cmd_help_who", -1);
			addAction("alias", this.command_Alias, "cmd_help_alias", 0, false, 1);
			addAction("delalias", this.command_DelAlias, "cmd_help_delalias", 0);
			addAction("clearalias", this.command_ClearAlias, "cmd_help_clearalias", 0);
			addAction("listaliases", this.command_ListAliases, "cmd_help_listaliases", -1);
			addAction("rules", this.command_Rules, "cmd_help_rules", -1);
			//addAction("exhaust", this.command_Exhaust, null);
		}
	}
}
